<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>创建订单 - 废物回收管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="/">废物回收管理系统</a>
        </div>
    </nav>

    <div class="container mt-4">
        <h2>创建订单</h2>
        <form th:action="@{/order/create}" method="post" class="mt-4">
            <div class="mb-3">
                <label for="stationId" class="form-label">回收站点</label>
                <select class="form-select" id="stationId" name="stationId" required>
                    <option value="">请选择回收站点</option>
                    <option th:each="station : ${stations}" 
                            th:value="${station.id}" 
                            th:text="${station.name}"></option>
                </select>
            </div>
            
            <div class="mb-3">
                <label for="wasteType" class="form-label">废物类型</label>
                <select class="form-select" id="wasteType" name="wasteType" required>
                    <option value="">请选择废物类型</option>
                    <option value="PAPER">纸类</option>
                    <option value="PLASTIC">塑料</option>
                    <option value="METAL">金属</option>
                    <option value="GLASS">玻璃</option>
                    <option value="ELECTRONIC">电子废物</option>
                    <option value="OTHER">其他</option>
                </select>
            </div>
            
            <div class="mb-3">
                <label for="estimatedWeight" class="form-label">预估重量(kg)</label>
                <input type="number" step="0.1" class="form-control" id="estimatedWeight" name="estimatedWeight" required>
            </div>
            
            <div class="mb-3">
                <label for="description" class="form-label">描述</label>
                <textarea class="form-control" id="description" name="description" rows="3"></textarea>
            </div>
            
            <div class="mb-3">
                <label for="address" class="form-label">地址</label>
                <input type="text" class="form-control" id="address" name="address" required>
            </div>
            
            <div class="mb-3">
                <label for="contactPhone" class="form-label">联系电话</label>
                <input type="tel" class="form-control" id="contactPhone" name="contactPhone" required>
            </div>
            
            <button type="submit" class="btn btn-primary">提交订单</button>
            <a href="/" class="btn btn-secondary">返回</a>
        </form>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/js/bootstrap.bundle.min.js"></script>
</body>
</html> 